#pragma once
#include "../../iaudio.h"
#include "../../../dispatchable.h"
class TSounddias;

namespace Commands
{

namespace Core
{
    template <class T> class Command;
}

class SmartAudio : public IAudio, public Dispatchable
{
public:
    SmartAudio(char* path, int channel = -1);
    virtual ~SmartAudio();

    virtual void Play(void);
    virtual void Play(const int channel);
    virtual void Stop(void);
    virtual void PlayContinous(void);
    virtual void PlayContinous(const int channel);
    virtual void FadeOut(const float seconds);

    using Dispatchable::AddCommand;

    void AddCommand(const int queueId, const Core::Command<IAudio>& command);

private:
    int channel;
    int playing_channel;
    TSounddias* sound;
};

}//namespace
